package com.gg.user.controller;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.gg.user.service.UserService;

import base.BaseServlet;


@WebServlet("/user/VerifyPhoneServlet")
public class VerifyPhoneServlet extends BaseServlet {
	@Autowired
	private UserService userService;
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String tel = request.getParameter("phone");
		boolean res = userService.verifyPhone(tel);
		response.setContentType("application/json;charset=utf-8");
		response.getWriter().print(res);
	}

}
